home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1996 April / Macworld (1996-04).dmg / Shareware World / Entertainment / General / Xconq 7.0.1 / lib / wizard.g < prev    next >
Text File  |  1995-08-22  |  12KB  |  347 lines

  1. (game-module "wizard"
  2.   (blurb "Wizard dominated game")
  3. )
  4.  
  5. ;(game-module (title "when the gods were young"))
  6.  
  7. (unit-type w (name "wagon") (char "w") (image-name "wiz-wagon")
  8.   (help "moves supplies"))
  9. (unit-type s (name "ship") (char "s") (image-name "wiz-ship")
  10.   (help "transports units over water"))
  11. (unit-type g (name "grog") (char "g") (image-name "wiz-grog")
  12.   (help "marches around and captures things"))
  13. (unit-type k (name "knight") (char "k") (image-name "wiz-knight")
  14.   (help "rides around and captures things better"))
  15. (unit-type d (name "demon") (char "d") (image-name "wiz-demon")
  16.   (help "kills and captures even better"))
  17. (unit-type f (name "fire") (char "f") (image-name "wiz-fire")
  18.   (help "burns things up"))
  19. (unit-type e (name "earth") (char "e") (image-name "wiz-earth")
  20.   (help "very strong, hard to kill"))
  21. (unit-type a (name "air") (char "a") (image-name "wiz-air")
  22.   (help "carries things through the sky"))
  23. (unit-type c (name "crystal") (char "c") (image-name "wiz-crystal")
  24.   (help "sees very far"))
  25. (unit-type m (name "manicon") (char "m") (image-name "wiz-manicon")
  26.   (help "concentrated mana ball"))
  27. (unit-type W (name "wizard") (char "W") (image-name "wiz-wizard")
  28.   (help "makes magic"))
  29. (unit-type * (name "town") (char "*") (image-name "wiz-town")
  30.   (help "produces food and grogs only"))
  31. (unit-type @ (name "city") (char "@") (image-name "wiz-city")
  32.   (help "produces all things except mana"))
  33. (unit-type ! (name "guild") (char "!") (image-name "wiz-guild")
  34.   (help "produces mana and wizards"))
  35. (unit-type $ (name "outpost") (char "$") (image-name "wiz-outpost")
  36.   (help "supplies mundanes"))
  37.  
  38. (material-type food (help "what people eat"))
  39. (material-type mana (help "magic energy"))
  40. (material-type drink (help "what people drink"))
  41.  
  42. (terrain-type sea (char ".") (color "sky blue"))
  43. (terrain-type shallows (char ",") (color "cyan"))
  44. (terrain-type swamp (char "=") (color "yellowgreen"))
  45. (terrain-type desert (char "~") (color "yellow"))
  46. (terrain-type plains (char "+") (color "green"))
  47. (terrain-type forest (char "%") (color "forest green"))
  48. (terrain-type mountains (char "^") (color "sienna"))
  49. (terrain-type ice (char "_") (color "white"))
  50. (terrain-type vacuum (char ":") (color "black"))
  51.  
  52. ;FIXME I guess nuked is damaged-terrain now, T1 T2 -> N
  53. ;FIXME t* t* nuked    ; most terrain won't actually change
  54. ;FIXME desert ( plains forest ) nuked
  55. ;FIXME mountains ice nuked
  56.  
  57. (define water ( sea shallows ))
  58. (define land ( plains forest desert mountains ))
  59. (define marsh swamp)
  60.  
  61. (define cities ( ! * @ ))
  62. (define mundanes ( w s g k ))
  63. (define wizards ( W ))
  64. (define ships s)
  65. (define flyers ( a m ))
  66. (define ground ( w g k d f e c W ))
  67. (define movers ( w s g k d f e a c m W ))
  68. (define spells ( d f e a c m ))
  69. (define stupid ( w g m * ))
  70. (define smart ( k s d f e a c W @ ! ))
  71. (define slow ( w g c ))
  72. (define swift ( k d f e a W ))
  73.  
  74. ;FIXME spy-quality is U1 U2 -> % that U1 returns info about U2
  75. (table spy-quality (u* u* 10))
  76. ;    w  s  g  k  d  f  e  a  c  m  W  *  @  !  $
  77. ;  ( 10 10 10 5  10 1  1  1  1  1  5  50 40 15 15 ) u* revolt
  78. ;  ( 30 20 20 10 5  1  1  1  1  1  15 99 70 20 30 ) u* surrender
  79. ;  ( 30 20 20 10 1  1  1  1  1  1  20 99 99 15 20 ) u* siege
  80. ; 300 sea ships disaster
  81. ; "is lost in a storm" s disaster-message
  82. ; 100 t* a disaster
  83. ; "is lost in a storm" a disaster-message
  84.  
  85. ; no disasters
  86.  
  87. ;;; Static relationships.
  88.  
  89. ;; Unit-unit.
  90.  
  91. ;FIXME unit-size-as-occupant is U1 U2 -> N U1's size as occupant of U2
  92. (table unit-size-as-occupant add (u* u* 1))
  93. (table unit-size-as-occupant add (e u* 3))
  94. ;(table mp-per-occupant add (ships e 50))
  95. ;FIXME occupant-max is U1 U2 -> N upper limit on occupants by type
  96. (table occupant-max add (e movers 1))
  97. ;FIXME capacity is N, upper limit on total occupants by size
  98. (add movers capacity 1)
  99. (add ( * @ ! $ ) capacity 30)
  100. (add s capacity 3)
  101. (table occupant-max add (s movers 3))
  102. (table occupant-max add (a spells 1))
  103. (table occupant-max add (a e 0))
  104. (table occupant-max add (a wizard 1))
  105. (table occupant-max add (spells m 1))
  106. (table occupant-max add (wizards spells 1))
  107. ;(table mp-per-occupant add (wizards ( d f e ) 0))
  108. (table occupant-max add (u* c 1))
  109. (table occupant-max add ($ u* 5))
  110. (table occupant-max add (( * ! ) u* 10))
  111. (table occupant-max add (@ u* 20))
  112. (table occupant-max add (w ( g k ) 1))
  113. (table occupant-max add (( ! $ @ * ) ( ! $ * @ ) 0))
  114.  
  115. ;; Unit-terrain.
  116.  
  117. ;; Unit-material.
  118.  
  119. (table unit-storage-x
  120.   (wizards mana 25)
  121.   (! mana 150)
  122.   (spells mana 10)
  123.   (m mana 25)
  124.   (@ food 150)
  125.   (( * $ ) food 40)
  126.   (mundanes food 10)
  127.   (w food 20)
  128.   (mundanes drink 3)
  129.   (w drink 5)
  130.   (ships drink 4)
  131.   (cities drink 10)
  132.   ($ drink 10)
  133.   (! food 10)
  134.   )
  135.  
  136. (table productivity add (@ land ( 100 50 20 20 )))    ; one arg must be a scalar...
  137. (table productivity add (* land ( 100 50 20 20 )))
  138. (table productivity add (( $ ! ) land 100))
  139. (table productivity add (ships ( shallows marsh ) 100))
  140. (table productivity add (mundanes land 100))
  141. (table productivity add (mundanes desert 20))
  142.  
  143. (table base-production add (mundanes drink 2))
  144. (table base-production add (( $ ! * @ ) drink 10))
  145. (table base-production add (( @ * ) food 10))
  146. (table base-production add ($ food 4))
  147. (table base-production add (! mana 10))
  148.  
  149. (table base-consumption add (mundanes food 1))
  150. (table base-consumption add (spells mana 1))
  151. (table base-consumption add (mundanes drink 1))
  152. (table base-consumption add (wizards mana 1))
  153.  
  154. (table out-length add (u* m* 1))
  155. (table in-length add (u* m* 1))
  156. (table out-length add (( ! @ $ * ) m* 2))
  157.  
  158. ;;; Actions.
  159.  
  160. ;FIXME don't forget to add acp-per-turn for non-movers!
  161. ;                          w s g k d f e  a c m W
  162. (add movers acp-per-turn ( 1 6 1 2 3 4 1 10 3 8 3 ))
  163.  
  164. ;;; Movement.
  165.  
  166. ;FIXME moves is mp-to-{enter|leave}-terrain U T -> MP
  167. (table mp-to-enter-terrain add (slow land 1))
  168. (table mp-to-enter-terrain add (g marsh 1))
  169. (table mp-to-enter-terrain add (e marsh 2))
  170. (table mp-to-enter-terrain add (swift ( forest mountains marsh ) 2))
  171. (table mp-to-enter-terrain add (swift ( plains desert ) 1))
  172. (table mp-to-enter-terrain add (ships land 99))
  173. (table mp-to-enter-terrain add (ships water 1))
  174. (table mp-to-enter-terrain add (ships shallows 3))
  175. (table mp-to-enter-terrain add (ships marsh 5))
  176. (table mp-to-enter-terrain add ($ land 1))
  177. (table mp-to-enter-terrain add (flyers t* 1))
  178.  
  179. ;;; Construction.
  180.  
  181. ;FIXME make is replaced by acp-to-create, cp-per-build and friends
  182. ;FIXME ( 4 12 4 9 ) mundanes @ make
  183. ;FIXME ( 7 20 4 15 ) mundanes * make
  184. ;FIXME 12 wizards ! make
  185. ;FIXME 4 spells wizards make
  186. ;FIXME occupant-base-production is U M -> N of M that U produces as occupant
  187. (table occupant-base-production (u* m* 1))
  188. ;FIXME 4 $ w make
  189. (table material-to-build add (spells mana 4))
  190.  
  191. ;FIXME tp-to-build is U1 U2 -> TP that U1 needs before building U2
  192. ; you also need UnitProperty acp-to-toolup and Table tp-per-toolup
  193. (table tp-to-build add (u* u* 20))
  194.  
  195. ;FIXME this is handled by tech level and research now...
  196. ;FIXME 50 mundanes research
  197. ;FIXME 200 wizards research
  198. ;FIXME 100 spells research
  199. ;FIXME 100 m research
  200. ;FIXME 50 $ research
  201.  
  202. ;FIXME hp-per-repair is U1 U2 -> .01HP that U1 restores to U2 per repair action
  203. ; ...and you have to add...
  204. ; acp-to-repair is U1 U2 -> ACP to do one repair action
  205. (table acp-to-repair add (u* u* 1))
  206. (table hp-per-repair add (u* u* 14))
  207.  
  208. ;;; Combat.
  209.  
  210. (add u* hp-max ( 1 2 1 1 3 1 5 1 1 1 2 5 10 15 8 ))
  211. ;FIXME in addition you can set hp-to-repair and other things to cripple a unit
  212. ;(add u* hp-at-min-speed ( 0 1 0 0 1 0 2 0 0 0 1 2 3  5 4 ))
  213.  
  214. ; w  s  g  k  d  f  e  a  c  m  W  *  @  !  $
  215. (table hit-chance add (w u* ( 50 20 10 10 5  5  5  5  20 70 30 30 10 5  10 )))
  216. (table hit-chance add (s u* ( 40 50 30 20 15 20 5  20 30 70 30 35 25 10 25 )))
  217. (table hit-chance add (g u* ( 70 60 50 30 20 30 10 30 40 80 40 50 40 25 40 )))
  218. (table hit-chance add (k u* ( 80 70 70 50 35 50 20 50 50 85 50 65 50 35 50 )))
  219. (table hit-chance add (d u* ( 85 80 75 65 50 60 30 65 70 90 25 70 60 50 60 )))
  220. (table hit-chance add (f u* ( 90 90 85 70 60 70 40 70 85 80 35 75 70 50 70 )))
  221. (table hit-chance add (e u* ( 80 70 70 50 35 40 20 50 85 80 15 70 70 70 70 )))
  222. (table hit-chance add (a u* ( 50 80 50 40 35 40 20 50 45 75 20 40 35 30 35 )))
  223. (table hit-chance add (c u* ( 20 15 10 5  5  5  5  5  20 50 15 20 10 5  10 )))
  224. (table hit-chance add (m u* ( 90 90 80 70 65 70 60 75 80 70 65 90 80 60 80 )))
  225. (table hit-chance add (W u* ( 90 90 75 65 60 65 40 65 80 80 50 70 60 50 60 )))
  226. (table hit-chance add (* u* ( 50 20 10 10 5  5  5  5  20 70 30 30 10 5  10 )))
  227. (table hit-chance add (@ u* ( 70 60 50 30 20 30 10 30 40 80 40 50 40 25 40 )))
  228. (table hit-chance add (! u* ( 90 90 75 65 60 65 40 65 80 80 50 70 60 50 60 )))
  229. (table hit-chance add ($ u* ( 70 60 50 30 20 30 10 30 40 80 40 50 40 24 40 )))
  230.  
  231. (table damage add (u* u* 1))
  232. (table damage add (d u* 2))
  233. (table damage add (f u* 4))
  234. (table damage add (f ( e ! $ ) 1))
  235. (table damage add (e ( @ ! $ * ) 3))
  236. (table damage add (m u* 8))
  237. (table damage add (a ships 3))
  238. (table consumption-per-attack add (m mana 20))
  239.  
  240. ;(add m acp-to-detonate 0)
  241.  
  242. (add m acp-to-detonate 1)
  243.  
  244. (table capture-chance add (g ( * @ ! $ ) ( 50 30 10 30 )))
  245. (table capture-chance add (k ( * @ ! $ ) ( 70 50 15 50 )))
  246. (table capture-chance add (d ( * @ ! $ ) ( 70 50 25 50 )))
  247. (table capture-chance add (wizards spells 20))
  248. (table capture-chance add (W ( * @ ! $ ) ( 70 50 50 50 )))
  249.  
  250. ;FIXME ferry-on-entry is U1 U2 -> FTYPE how much terrain U2 crosses to board U1
  251. (table ferry-on-entry add (( * @ ! $ ) ( g k d W ) over-all))    ; infantry can capture cities even on water.
  252.  
  253. (table protection add (* movers 80))
  254. (table protection add (( @ ! ) movers 50))
  255. (table protection add (! movers 20))    ; cities offer some protection to occupants
  256. (table protection add (k ( * @ ! $ ) 90))    ; armor protect the cities housing them.
  257. (table protection add (W ! 90))    ; can't make this too large or city can be
  258. (table protection add (( d f e ) ! 93))    ; invulnerable.
  259. (table protection add (g ( * @ ! $ ) 95))    ; same for infantry.
  260. (table protection add (e movers 50))
  261.  
  262. (add u* acp-to-change-side 0)    ; but armies have some loyalty
  263. (add ( c a m ) acp-to-change-side ( 80 65 40 ))
  264. (add ( * @ ! $ ) acp-to-change-side 100)
  265. ;FIXME true u* neutral
  266. ;FIXME false spells neutral
  267. ;FIXME true ( c m ) neutral
  268. ;FIXME false capturemoves
  269. (table consumption-as-occupant add (u* m* true))
  270. ;FIXME survival is now hp-per-starve U M -> HP
  271. (table hp-per-starve add (u* m* 30))
  272.  
  273. ; 10 u* max-quality
  274. ; 2 u* veteran
  275. ; ( 90 95 90 95 90 90 90 90 90 90 95 85 90 95 90 ) u* control
  276.  
  277. ;FIXME "vanquishes" movers destroy-message
  278. ;FIXME "sacks" cities destroy-message
  279.  
  280. ;FIXME hp-per-disband is U1 U2 -> HP lost in a disband action performed by U2
  281. ; you might add U1 acp-to-disband U2 as well, U1 U2 -> ACP
  282. ; (table hp-per-disband add (movers u* 100))
  283.  
  284. ;;; Vision.
  285.  
  286. ;FIXME vision-at is N, coverage afforded by unit in its own hex
  287. ;(add u* vision-at-max-range ( 40 60 50 70 80 70 50 70 90 30 85 40 70 85 70 ))
  288. ;(add u* vision-at ( 1 2 1 1 1 1 1 2 10 1 2 1 2 3 ))
  289. ;FIXME vision-at-max-range is N, coverage afforded by unit at max range
  290. (add u* vision-range ( 30 40 40 55 70 60 40 60 75 20 75 30 60 75 70 ))
  291. ;FIXME visibility is U T -> N, U's % visibility in T
  292. ;(table visibility add (wizards t* 40))
  293. ;FIXME conceal is now visibility, you should subtr these numbers from that table
  294. ;FIXME 15 ( forest mountains ) u* conceal
  295.  
  296. ;;; Setup.
  297.  
  298. (add t* alt-percentile-min (   0  68  69  70  70  70  93  99  0 ))
  299. (add t* alt-percentile-max (  68  69  71  93  93  93  99 100  0 ))
  300. (add t* wet-percentile-min (   0   0  50   0  20  80   0   0  0 ))
  301. (add t* wet-percentile-max ( 100 100 100  20  80 100 100 100  0 ))
  302.  
  303. (set edge-terrain ice)
  304.  
  305. (add @ start-with 1)
  306. (add ! start-with 1)
  307. (add * start-with 5)
  308. (add W start-with 1)
  309.  
  310. (table favored-terrain
  311.   (u* t* 0)
  312.   (* land 20)
  313.   (* plains 40)
  314.   (@ plains 100)
  315.   (! land 20)
  316.   (! mountains 40)
  317.   )
  318.  
  319. (set country-separation-min 10)
  320. (set country-separation-max 30)
  321.  
  322. (table independent-density
  323.   (* land 50)
  324.   (* plains 150)
  325.   (@ land 20)
  326.   (@ plains 50)
  327.   (! land 20)
  328.   (! plains 50)
  329.   )
  330.  
  331. ;;; Scoring.
  332.  
  333. (add ( * @ ! $ ) point-value ( 1 5 10 1 ))
  334.  
  335. (scorekeeper (do last-side-wins))
  336.  
  337. ;;; Documentation.
  338.  
  339. (game-module (instructions (
  340.   )))
  341.  
  342. (game-module (notes (
  343.   )))
  344.  
  345. (game-module (design-notes (
  346.   )))
  347.